from django.urls import path, re_path
from . import views

urlpatterns = [
    # name 等于路由别名
    path('', views.index, name='index'),
    path('<year>/<int:month>/<slug:day>', views.born, name='born'),
    path('url_outside', views.url_outside, {'month': '2025/09/01'}, name='url_outside'),
    # (?P<phone_num>...)  Django 命名分组语法
    re_path(r'^phone/(?P<phone_num>1[3-9]\d{9})/$', views.phone_demo),
    # re_path('(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2}).html', views.re_demo),
    path('', views.template_url, name='template_url'),

]
